<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/bulma.min.css">
    <style>
        #app {
            width: 600px;
            margin: 0 auto;
        }

        .box .son {
            height: 200px;
            display: none;
        }

        .box .on {
            display: block;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="tabs is-centered">
            <ul>
                <li v-for=" (item,index) in arr" :class = "index === num ? 'is-active':''" @click = " num = index"><a>{{item.id}}</a></li>
            </ul>
        </div>
        <div class="box">
            <div class="son" v-for = "(item,index) in arr" :class = " index ===num ? 'on' :''">{{item.title}}</div>
        </div>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                    num: 0,
                    arr: [
                        {
                            id: "图片",
                            title : "1111"
                        },
                        {
                            id: "音乐",
                            title : "2222"
                        },
                        {
                            id: "视频",
                            title : "3333"
                        },
                        {
                            id: "文档",
                            title : "4444"
                        },
                    ]
                }
            }

        })
    </script>
</body>

</html>